#ifndef TABLEWIDGET_H
#define TABLEWIDGET_H

#include <QWidget>

#include "tablemodel.h"
#include "database.h"

namespace Ui {
class TableWidget;
}

class TableWidget : public QWidget
{
    Q_OBJECT

public:
    explicit TableWidget(const QString& sql, const VMSV& datas, const QStringList& headers, QWidget *parent = nullptr);
    ~TableWidget();

    void setDatabase(Database *db);

private:
    Ui::TableWidget *ui;
    TableModel *m_model;
    QString m_sql;
};

#endif // TABLEWIDGET_H
